import { createSlice } from '@reduxjs/toolkit';

export interface ImageState {
  mapUrl: string;
}

const initialState: ImageState = {
  mapUrl: '',
};

const imageSlice = createSlice({
  name: 'image',
  initialState,
  reducers: {
    setMapUrl: (state, action) => {
      return {
        ...state,
        mapUrl: action.payload,
      };
    },
  },
});

export const imageReducer = imageSlice.reducer;
export const { setMapUrl } = imageSlice.actions;
